#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,mx=INT_MIN;
    cin>>n;
    int arr[n][n];
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < n; ++j)
            cin>>arr[i][j];
    for (int i = 0; i < n; ++i)
        mx=max(mx,max(arr[i][n-1-i],arr[i][i]));
    cout<<mx<<endl;
    return 0;
}